@echo off
@echo         precompiling...
cd %RAW_PATH%
if "%1"=="debug" (
set PREPROCESSOR_OPT=-DUSE_DEBUG
) else (
set PREPROCESSOR_OPT=-DSCREEN_WIDTH=%1 -DSCREEN_HEIGHT=%2
)

if "%NOKIA_BUILD%"=="1" (
set PREPROCESSOR_OPT=%PREPROCESSOR_OPT% -DUSE_GAME_CANVAS -DREMOVE_IMAGES
)

for %%i in (*.java) do (
%TOOLS_PATH%\cpp32 %PREPROCESSOR_OPT% -o%PREPROCESSED_PATH%\%%i %%i > NUL 
if errorlevel 1 (
%TOOLS_PATH%\cpp32 %PREPROCESSOR_OPT% -o%PREPROCESSED_PATH%\%%i %%i
)
)
